perm filename MET18.LSP[TIM,LSP] blob
sn#715207 filedate 1983-06-14 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 Benchmark to print to a file.
C00004 ENDMK
Cā;
;;; Benchmark to print to a file.
(declare
(fasload meter)
(load "metint.lsp")
(setq meter:count-only t))
(declare
(setq local-objects-of-interest
'((subst "Substs"))))
;;; The Maclisp Code
(declare (fixsw t))
(meter:meter fprint
(meter-funs #.(all-objs)
(defun init (m n atoms)
(mn "INIT" init)
(let ((atoms (subst () () atoms)))
(do ((a atoms (cdr a)))
((null (cdr a)) (rplacd a atoms)))
(init1 m n atoms)))
(defun init1 (m n atoms)
(mn "INIT1" init1)
(cond ((= m 0) (pop atoms))
(t (do ((i n (- i 2))
(a ()))
((< i 1) a)
(mn "Cars" car)(mn "Cdrs" cdr)
(push (pop atoms) a)
(push (init1 (1- m) n atoms) a)))))
(declare (special test-atoms))
(setq test-atoms '(abcdef12 cdefgh23 efghij34 ghijkl45 ijklmn56 klmnop67
mnopqr78 opqrst89 qrstuv90 stuvwx01 uvwxyz12
wxyzab23 xyzabc34 123456ab 234567bc 345678cd
456789de 567890ef 678901fg 789012gh 890123hi))))